import request from '@/config/axios'

// 医院信息 VO
export interface RecruitmentHospitalVO {
  id: number // 主键
  name: string // 医院名称
  nickname: string // 医院别名
  category: number // 医院类别
  scale: number // 医院规模
  address: string // 地址
  logoUrl: string // 图标
  description: string // 医院简介
  status: number // 状态
}

// 医院信息 API
export const RecruitmentHospitalApi = {
  // 查询医院信息分页
  getRecruitmentHospitalPage: async (params: any) => {
    return await request.get({ url: `/hospital/recruitment-hospital/page`, params })
  },

  // 查询医院信息详情
  getRecruitmentHospital: async (id: number) => {
    return await request.get({ url: `/hospital/recruitment-hospital/get?id=` + id })
  },

  // 新增医院信息
  createRecruitmentHospital: async (data: RecruitmentHospitalVO) => {
    return await request.post({ url: `/hospital/recruitment-hospital/create`, data })
  },

  // 修改医院信息
  updateRecruitmentHospital: async (data: RecruitmentHospitalVO) => {
    return await request.put({ url: `/hospital/recruitment-hospital/update`, data })
  },

  // 删除医院信息
  deleteRecruitmentHospital: async (id: number) => {
    return await request.delete({ url: `/hospital/recruitment-hospital/delete?id=` + id })
  },

  // 导出医院信息 Excel
  exportRecruitmentHospital: async (params) => {
    return await request.download({ url: `/hospital/recruitment-hospital/export-excel`, params })
  }
}